Skip to content

feat(session): 增加 Redis Session Handler - #43

Merged
JanHuang merged 1 commit into
masterfrom
feat/redis-session-20261027
Oct 27, 2026
Merged

JanHuang merged 1 commit into
masterfrom
feat/redis-session-20261027

Conversation

@JanHuang

Copy link
Copy Markdown
Member

变更

HTTP Session 新增 Redis 存储方案:

  • RedisSessionHandler
    • Redis TTL 过期
    • JSON 序列化
    • payload 大小限制
    • destroy / exists
  • RedisClientInterface
    • 便于测试和替换客户端
  • PhpRedisSessionClient
    • phpredis 适配器
  • ext-redis 作为 suggest 依赖
  • 单元测试与 README 示例

验证

  • RedisSessionHandlerTest:5 tests / 11 assertions ✅
  • HTTP full suite:762 tests / 2015 assertions ✅
  • PHPStan:No errors ✅

- RedisSessionHandler 支持 TTL、JSON payload、销毁、存在检查
- PhpRedisSessionClient 适配 phpredis
- RedisClientInterface 便于测试/替换客户端
- 增加单元测试与 README 用法
@JanHuang
JanHuang merged commit 7a534d7 into master Oct 27, 2026
2 checks passed
@JanHuang
JanHuang deleted the feat/redis-session-20261027 branch October 27, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant